package com.hoas.quickstart.threads.chapter03.chapter03_1_11_4;

public class Run3 {

    public static void main(String[] args) {
        MyStack stack = new MyStack();
        P p1 = new P( stack );
        P p2 = new P( stack );
        P p3 = new P( stack );
        P p4 = new P( stack );
        P p5 = new P( stack );

        PThread pThread1 = new PThread( p1 );
        PThread pThread2 = new PThread( p2 );
        PThread pThread3 = new PThread( p3 );
        PThread pThread4 = new PThread( p4 );
        PThread pThread5 = new PThread( p5 );


        pThread1.start();
        pThread2.start();
        pThread3.start();
        pThread4.start();
        pThread5.start();

        C c1 = new C( stack );
        C c2 = new C( stack );
        C c3 = new C( stack );
        C c4 = new C( stack );
        C c5 = new C( stack );
        CThread cThread1 = new CThread( c1 );
        CThread cThread2 = new CThread( c2 );
        CThread cThread3 = new CThread( c3 );
        CThread cThread4 = new CThread( c4 );
        CThread cThread5 = new CThread( c5 );
        cThread1.start();
        cThread2.start();
        cThread3.start();
        cThread4.start();
        cThread5.start();

    }

}
